<template>
  <div class="xin">
    <p>qiankun入口文档</p>
    <div id="qiankun-container"></div>
    <!--xinHome 为放置子项目的盒子  -->
  </div>
</template>

<!-- <script>
import { loadMicroApp, start } from 'qiankun'; //引入手动调用方法

export default {
  name: 'XinVue2',
  data() {
    return {};
  },
  created() {
    this.$nextTick(() => {
      // hash模式下配置
      const getActiveRule = hash => location => location.hash.startsWith(hash);
      this.vueApp = loadMicroApp({
        name: 'qiankun-children',
        entry: '//localhost:8081/',
        container: '#xinHome',
        activeRule: getActiveRule('#/'),
      });
      //启动乾坤函数
      start({ singular: false });
    });
  },
  beforeDestroy() {
    console.log(this.vueApp.unmount({ name: 'qiankun-children' }));
    this.vueApp.unmount({ name: 'qiankun-children' });
  },
  methods: {},
};
</script> -->

